-
Notifications
You must be signed in to change notification settings - Fork 222
sync: Avoid deleting files ignored by git during pipelines sync
#3847
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sync: Avoid deleting files ignored by git during pipelines sync
#3847
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
7104b03 to
9aa835b
Compare
1954f31 to
ff72cf7
Compare
* functioning modifications and running tests * helper functions for git file retrieval * typos * easier to read git add syntax * small simplification * Updated docstrings * helper method for tests * Refactoring for clarity --------- Co-authored-by: Tatiana Gelaf Romer <[email protected]>
When some files are already globally ignored via .gitignore, git add --all will not add them even if we want to force add all files except some specific ones. Not using force will cause git to error out since the files with the exclude pattern are already ignored.
…files from being commited
fbd5b89 to
9d08715
Compare
pipelines syncpipelines sync
mirpedrol
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution @tgelafr-pfzr, changes are looking good!
But we are moving to pathlib instead of os, could you please change the library used? For example using Path.walk() instead of os.walk(), avoiding os.path.join, etc.
@mirpedrol I modified as much as possible, Path.walk is only available in Python 3.12+ |
Avoid deleting files ignored by git during
pipelines sync.Follow up on this issue: #2146, but avoids committing previously ignored files after switching to the
TEMPLATEbranch by keeping record of them before checkout.PR checklist
CHANGELOG.mdis updated